d/test.sh: Don't repeat build-time tests if they fail once. They seem to be somewhat...
authorSimon McVittie <smcv@debian.org>
Thu, 26 Oct 2017 23:19:44 +0000 (00:19 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 26 Oct 2017 23:19:44 +0000 (00:19 +0100)
debian/changelog
debian/test.sh

index 89293715400bdb1343538333ad8caf018d77b5eb..e660671bc9f5a0dbeacd4dcad77971c6e0ec664d 100644 (file)
@@ -24,6 +24,8 @@ ostree (2017.12-2) UNRELEASED; urgency=medium
     Add more test coverage from upstream
     - d/rules: Make the new test executable
   * d/test.sh: Clean up ostree-trivial-httpd processes
+  * d/test.sh: Don't repeat build-time tests if they fail once. They seem
+    to be somewhat reliable now.
 
  -- Simon McVittie <smcv@debian.org>  Mon, 16 Oct 2017 10:13:54 +0100
 
index b46c538cb3ec9d23aa3bd4e7dbbc87984684cb1a..d0dba67d5b965455a6cd0672dd8996665d0f2204 100755 (executable)
@@ -13,20 +13,9 @@ unset http_proxy
 unset https_proxy
 unset no_proxy
 
-try_tests=5
-
 failed=0
 make check || failed=1
 
-if [ "$failed" -gt 0 ]; then
-    [ "$failed" -eq 0 ] || echo "Test failed! Checking how reproducible it is..."
-    for i in $(seq 1 "$(( $try_tests - 1 ))"); do
-        if ! make check; then
-            failed=$(( $failed + 1 ))
-        fi
-    done
-fi
-
 pkill --full "gpg-agent --homedir /var/tmp/tap-test\\.[^/]+/.*" || :
 pkill --full '\.libs/ostree-trivial-httpd' || :
 
@@ -37,18 +26,6 @@ if pgrep lt-ostree || pgrep --full '\.libs/ostree-trivial-httpd' || pgrep --full
     pgrep lt-ostree | xargs --no-run-if-empty ps ww
 fi
 
-# There are several race conditions that cause intermittent failures.
-# They are not actually a regression - we've just been luckier in the
-# past - so let newer versions build reliably.
-if [ "$failed" -gt 1 ]; then
-    echo "Failed $failed out of $try_tests test runs; that seems bad"
-    exit 1
-elif [ "$failed" -gt 0 ]; then
-    echo "Failed $failed out of $try_tests test runs; continuing anyway"
-else
-    echo "All tests passed"
-fi
-
-exit 0
+exit $failed
 
 # vim:set et sw=4 sts=4: